/*
 * Copyright 2008 Wink Saville
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License version 3
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

import com.saville.debug.*;
import com.saville.msgcomp.*;
import com.saville.mc.*;

public class TestClient1 extends ActiveMc {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        new TestClient1();
    }

    TestClient1() {
        super("TestClient1");
        df = Log.VERBOSE;
        // mMcMgr.df = Log.VERBOSE;

        String serverName = "TestServer1";
        int id = lookup(serverName);
        if (id != -1) {
            Msg msg = getMsg(id, McConst.MC_GUID, McConst.MC_CMD_ECHO);
            sendMsg(msg);
        } else {
            Log.print("%s: Lookup of %s failed", mName, serverName);
        }
    }

    @Override
    public void processMsg(Msg msg) {
        Log.v(df, "%s: processMsg dstId=%d guid=0x%x cmd=0x%x status=%d", mName, msg.dstId,
            msg.guid, msg.cmd, msg.status);
    }
}
